#include "Environment.h"

static const double DEFAULT_STALE_FILE_CHECK_INTERVAL = 10;

namespace phnq
{
	namespace phnqlets
	{
		Environment* Environment::getInstance()
		{
			static Environment instance;
			return &instance;
		}

		Environment::Environment()
		{
			// a little constructor action
			this->staleFileCheckInterval = DEFAULT_STALE_FILE_CHECK_INTERVAL;
		}

		Environment::~Environment()
		{
			// a little destructor action
		}

		void Environment::addResourcePath(string path)
		{
			resourcePaths.push_back(path);
		}
	
		vector<string> Environment::getResourcePaths()
		{
			return resourcePaths;
		}
		
		double Environment::getStaleFileCheckInterval()
		{
			return this->staleFileCheckInterval;
		}
	
		void Environment::setStaleFileCheckInterval(double interval)
		{
			this->staleFileCheckInterval = interval;
		}
		
		compression_info Environment::getCompressionForPath(string path)
		{
			compression_info info;
			info.type = COMPRESSION_DEFLATE_DYNAMIC;
			//info.type = COMPRESSION_NONE;
			info.level = 9;
			return info;
		}
	}
}
